//
//  LSZResourceEvaluationListManager.m
//  JKFuYinProject
//
//  Created by 九酷 on 2017/12/23.
//  Copyright © 2017年 LC. All rights reserved.
//

#import "LSZResourceEvaluationListManager.h"

@implementation LSZResourceEvaluationListManager
-(id)initWithResourceEvaluationList:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        self.mutMgArray  = [[NSMutableArray alloc]init];
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSString class]]) {
            return self;
        }
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSNumber class]]) {
            return self;
        }
        if (![dic valueForKey:@"data"]) {
            return self;
        }
        NSArray * arrayData = dic[@"data"];
        NSMutableArray * arrayMg = [[NSMutableArray alloc]init];
        for (NSDictionary * diction in  arrayData) {
            LSZResourceEvaluationListMg * manager = [[LSZResourceEvaluationListMg alloc]init];
            manager.publisher     = NullStringjudgment(NSStr(diction[@"publisher"]));
            manager.publisherHead = NullStringjudgment(NSStr(diction[@"publisherHead"]));
            NSString * timeString = [LSZSpecialPackaging GetThePreviousTime1970:NullStringjudgment(NSStr(diction[@"publishTime"]))];
            manager.publishTime   = [LSZSpecialPackaging GetThePreviousTimeAndCompareItNow:timeString];
            manager.praiseNum     = NullStringjudgment(NSStr(diction[@"praiseNum"]));
            manager.commentNum    = NullStringjudgment(NSStr(diction[@"commentNum"]));
            manager.id_id         = NullStringjudgment(NSStr(diction[@"id"]));
            manager.publisherId   = NullStringjudgment(NSStr(diction[@"publisherId"]));
            manager.content       = NullStringjudgment(NSStr(diction[@"content"]));
            [arrayMg addObject:manager];
        }
        self.mutMgArray = arrayMg;
    }
    return self;
}
@end
@implementation LSZResourceEvaluationListMg
@end
